package main.java.dao.impl;

import main.java.dao.BaseDAO;
import main.java.dao.DepartmentDao;
import main.java.polo.Department;

import java.util.Collections;
import java.util.List;

public class DepartmentDaoImpl extends BaseDAO implements DepartmentDao {

    @Override
    public List<Department> selectAll() {
        try {
            String sql = "select dept_id deptId ,dept_name deptName from t_dept where dept_id is not null";
            return executeQuery(Department.class, sql,null);
        }catch (Exception e){
            throw new RuntimeException(e);
        }
    }
}
